﻿// -----------------------------------------------------------------------
// <copyright file="ActionGuard.cs" company="Microsoft">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace mmonkey.core.Utils
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public static class ActionGuard
    {
        /// <summary>
        /// Ensures the specified action is not null.
        /// </summary>
        /// <param name="action">Action.</param>
        /// <param name="parameterName">Action name.</param>
        public static void IsNotNull(Action<object> action, String actionName)
        {
            if (action == null)
            {
                throw new ArgumentNullException(actionName, String.Format("Action '{0}' cannot be null.", actionName));
            }
        }
    }
}
